<!DOCTYPE html>
<html>
<head>
    <meta  charset="utf-8" />
    <script src="/webjars/jquery/3.4.1/jquery.js"></script>
    <script>
        $(function () {
            $.ajax({
                url:'http://localhost:8080/hello',
                type:'post',
                success:function (data) {
                    $("#info").html("跨域访问成功，得到的响应数据："+data);
                },
                error:function (data) {
                    $("#info").html("跨域失败!");
                }
            });
        });

    </script>
</head>

<body>
    <h2>前台系统</h2>
    <p id="info"></p>

</body>
</html>
